import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/rigth'
  },
  {
    path: '/about',
    name: 'about',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  },
  {
    path: '/rigth',
    name: 'rigth',
    component: () => import('../views/rigth/index.vue')
  },
  {
    path: '/rigth2',
    name: 'rigth2',
    component: () => import('../views/rigth2/index.vue')
  },
  {
    path: '/rigth3',
    name: 'rigth3',
    component: () => import('../views/rigth3/index.vue')
  },
  {
    path: '/hello',
    name: 'hello',
    component: () => import('../components/HelloWorld.vue')
  }
  
]

const router = new VueRouter({
  routes
})

export default router
